/*
Based off of the Ayu theme
Original by Dempfi (https://github.com/dempfi/ayu)
*/

:root {
	--main-background-color: #0f1419;
	--main-color: #c5c5c5;
	--settings-input-color: #ffb454;
	--sidebar-background-color: #14191f;
	--sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
	--code-block-background-color: #191f26;
	--scrollbar-track-background-color: transparent;
	--scrollbar-thumb-background-color: #5c6773;
	--scrollbar-color: #5c6773 #24292f;
	--headings-border-bottom-color: #5c6773;
	--border-color: #5c6773;
	--button-background-color: #141920;
	--right-side-color: grey;
	--code-attribute-color: #999;
	--toggles-color: #999;
	--search-input-focused-border-color: #5c6773; /* Same as `--border-color`. */
	--copy-path-button-color: #fff;
	--copy-path-img-filter: invert(70%);
	--copy-path-img-hover-filter: invert(100%);
	--codeblock-error-hover-color: rgb(255, 0, 0);
	--codeblock-error-color: rgba(255, 0, 0, .5);
	--codeblock-ignore-hover-color: rgb(255, 142, 0);
	--codeblock-ignore-color: rgba(255, 142, 0, .6);
	--type-link-color: #ffa0a5;
	--trait-link-color: #39afd7;
	--assoc-item-link-color: #39afd7;
	--function-link-color: #fdd687;
	--macro-link-color: #a37acc;
	--keyword-link-color: #39afd7;
	--mod-link-color: #39afd7;
	--link-color: #39afd7;
}

.slider {
	background-color: #ccc;
}
.slider:before {
	background-color: white;
}
input:focus + .slider {
	box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
}

h1, h2, h3, h4 {
	color: white;
}
h1.fqn  a {
	color: #fff;
}
h4 {
	border: none;
}

.docblock code {
	color: #ffb454;
}
.code-header {
	color: #e6e1cf;
}
.docblock pre > code, pre > code {
	color: #e6e1cf;
}
.item-info code {
	color: #e6e1cf;
}
.docblock a > code {
	color: #39AFD7 !important;
}
pre, .rustdoc.source .example-wrap {
	color: #e6e1cf;
}

.rust-logo {
	filter: drop-shadow(1px 0 0px #fff)
		drop-shadow(0 1px 0 #fff)
		drop-shadow(-1px 0 0 #fff)
		drop-shadow(0 -1px 0 #fff);
}

.sidebar .current,
.sidebar a:hover {
	background-color: transparent;
	color: #ffb44c;
}

.sidebar-elems .location {
	color: #ff7733;
}

.src-line-numbers span { color: #5c6773; }
.src-line-numbers .line-highlighted {
	color: #708090;
	background-color: rgba(255, 236, 164, 0.06);
	padding-right: 4px;
	border-right: 1px solid #ffb44c;
}

.search-results a:hover {
	color: #fff !important;
	background-color: #3c3c3c;
}

.search-results a:focus {
	color: #fff !important;
	background-color: #3c3c3c;
}
.search-results a {
	color: #0096cf;
}
.search-results a div.desc {
	color: #c5c5c5;
}

.content .item-info::before { color: #ccc; }

.sidebar a { color: #53b1db; }
.sidebar a.current.type { color: #53b1db; }

pre.rust .comment { color: #788797; }
pre.rust .doccomment { color: #a1ac88; }

.sidebar h2 a,
.sidebar h3 a {
	color: white;
}
body.source .example-wrap pre.rust a {
	background: #333;
}

details.rustdoc-toggle > summary::before {
	filter: invert(100%);
}

#crate-search-div::after {
	/* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
	filter: invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);
}
#crate-search:hover, #crate-search:focus {
	border-color: #e0e0e0 !important;
}
#crate-search-div:hover::after, #crate-search-div:focus-within::after {
	filter: invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);
}

.search-input {
	color: #fff;
}

.module-item .stab,
.import-item .stab {
	color: #000;
}

.stab {
	color: #c5c5c5;
	background: #314559 !important;
}

.stab.portability > code {
	color: #e6e1cf;
	background: none;
}

.result-name .primitive > i, .result-name .keyword > i {
	color: #788797;
}

.src-line-numbers :target { background-color: transparent; }

/* Code highlighting */
pre.rust .number, pre.rust .string { color: #b8cc52; }
pre.rust .kw, pre.rust .kw-2, pre.rust .prelude-ty,
pre.rust .bool-val, pre.rust .prelude-val,
pre.rust .lifetime { color: #ff7733; }
pre.rust .macro, pre.rust .macro-nonterminal { color: #a37acc; }
pre.rust .question-mark {
	color: #ff9011;
}
pre.rust .self {
	color: #36a3d9;
	font-style: italic;
}
pre.rust .attribute {
	color: #e6e1cf;
}

pre.example-line-numbers {
	color: #5c67736e;
	border: none;
}

a.test-arrow {
	font-size: 100%;
	color: #788797;
	border-radius: 4px;
	background-color: rgba(57, 175, 215, 0.09);
}

a.test-arrow:hover {
	background-color: rgba(57, 175, 215, 0.368);
	color: #c5c5c5;
}

:target {
	background: rgba(255, 236, 164, 0.06);
	border-right: 3px solid rgba(255, 180, 76, 0.85);
}

.search-failed a {
	color: #39AFD7;
}

.tooltip::after {
	background-color: #314559;
	color: #c5c5c5;
}

.tooltip::before {
	border-color: transparent #314559 transparent transparent;
}

.notable-traits-tooltiptext {
	background-color: #314559;
}

#titles > button.selected {
	background-color: #141920 !important;
	border-bottom: 1px solid #ffb44c !important;
	border-top: none;
}

#titles > button:not(.selected) {
	background-color: transparent !important;
	border: none;
}

#titles > button:hover {
	border-bottom: 1px solid rgba(242, 151, 24, 0.3);
}

#titles > button > div.count {
	color: #888;
}

/* rules that this theme does not need to set, here to satisfy the rule checker */
/* note that a lot of these are partially set in some way (meaning they are set
individually rather than as a group) */
/* FIXME: these rules should be at the bottom of the file but currently must be
above the `@media (max-width: 700px)` rules due to a bug in the css checker */
/* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
pre.rust .lifetime {}
pre.rust .kw {}
#titles > button:hover, #titles > button.selected {}
pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .attribute {}
pre.rust .kw-2, pre.rust .prelude-ty {}

.search-results a:focus span {}
a.result-trait:focus {}
a.result-traitalias:focus {}
a.result-mod:focus,
a.result-externcrate:focus {}
a.result-mod:focus {}
a.result-externcrate:focus {}
a.result-enum:focus {}
a.result-struct:focus {}
a.result-union:focus {}
a.result-fn:focus,
a.result-method:focus,
a.result-tymethod:focus {}
a.result-type:focus {}
a.result-associatedtype:focus {}
a.result-foreigntype:focus {}
a.result-attr:focus,
a.result-derive:focus,
a.result-macro:focus {}
a.result-constant:focus,
a.result-static:focus {}
a.result-primitive:focus {}
a.result-keyword:focus {}

.sidebar a.current.enum {}
.sidebar a.current.struct {}
.sidebar a.current.foreigntype {}
.sidebar a.current.attr,
.sidebar a.current.derive,
.sidebar a.current.macro {}
.sidebar a.current.union {}
.sidebar a.current.constant
.sidebar a.current.static {}
.sidebar a.current.primitive {}
.sidebar a.current.trait {}
.sidebar a.current.traitalias {}
.sidebar a.current.fn {}
.sidebar a.current.keyword {}

kbd {
	color: #c5c5c5;
	background-color: #314559;
	box-shadow: inset 0 -1px 0 #5c6773;
}

#settings-menu > a, #help-button > button {
	color: #fff;
}

#settings-menu > a img {
	filter: invert(100);
}

#settings-menu > a:hover, #settings-menu > a:focus,
#help-button > button:hover, #help-button > button:focus {
	border-color: #e0e0e0;
}

.search-results .result-name span.alias {
	color: #c5c5c5;
}
.search-results .result-name span.grey {
	color: #999;
}

#source-sidebar > .title {
	color: #fff;
}
#source-sidebar div.files > a:hover, details.dir-entry summary:hover,
#source-sidebar div.files > a:focus, details.dir-entry summary:focus {
	background-color: #14191f;
	color: #ffb44c;
}
#source-sidebar div.files > a.selected {
	background-color: #14191f;
	color: #ffb44c;
}

.scraped-example-list .scrape-help {
	border-color: #aaa;
	color: #eee;
}
.scraped-example-list .scrape-help:hover {
	border-color: white;
	color: white;
}
.scraped-example .example-wrap .rust span.highlight {
	background: rgb(91, 59, 1);
}
.scraped-example .example-wrap .rust span.highlight.focus {
	background: rgb(124, 75, 15);
}
.scraped-example:not(.expanded) .code-wrapper:before {
	background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
}
.scraped-example:not(.expanded) .code-wrapper:after {
	background: linear-gradient(to top, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
}
.toggle-line-inner {
	background: #999;
}
.toggle-line:hover .toggle-line-inner {
	background: #c5c5c5;
}
